<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<form action="index.php?top=page&option=com_frcenter" method="post" name="adminFormSearch" id="adminFormSearch">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <input type="hidden" name="task" value="search" />
 <!-- END LEFT -->
</form>
<form action="index.php?top=page&option=com_frcenter&task=activitive" method="post" name="adminForm" id="adminForm">
 <!-- CONTENT -->
 <div id="jm-content">
    <div class="cc title">
        <div class="id"><?php echo $this->info_ocba->OCBA_CODE; ?></div>
        <div class="cc-title">
            <p class="top"><?php echo $this->info_ocba->OCBA_KANA; ?></p>
            <p class="bot"><?php echo $this->info_ocba->OCBA_NAME; ?><span class="float-right">【<?php echo $this->info_ocba->OCBA_SHOR; ?>】</span></p>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="menu-cc">
        <ul id="nav">
        
        <?php 
            foreach(bgData::getMenuDetailCenter() as $key=>$item){
                $acctive = 'normal';
                if(JRequest::getVar('task') == $key){
                    $acctive = 'current';
                }
         ?>
            <li class="<?php echo $acctive; ?>"><a href="index.php?top=page&option=com_frcenter&task=<?php echo $key; ?>&id=<?php echo $this->info_ocba->OCBA_CODE; ?>"><?php echo $item; ?></a></li>
          <?php } ?>
            
        </ul>
    </div>
    
    <div id=""> 
    <h3 class="h_title">活動情報一覧</h3>                    

        
        <?php
            if($this->rows != null){
                foreach($this->rows as $value){
        ?>
            <div class="cc">
            <table cellspacing="0" cellpadding="0" width="100%" border=0 style="margin-top: 10px;">
                <tbody>
                    <tr style="visibility:hidden">
                        <td style="width:25%"></td>
                        <td style="width:40%"></td>
                        <td style="width:35%"></td>
                    </tr>
                    <tr>

                        <td colspan="4">
                            <h2>
                        <span class="id-cc"><?php echo $value->ACTT_NAME; ?></span>
                        <span class="float-right" style="margin-top:2px;"><button href="index.php?top=page&option=com_fractivitive&task=detail&cid=<?php echo $value->ACTT_CODE; ?>">詳細</button></span>
                        <span class="float-right" style="margin-top:5px;">
                                    <?php $a= $value->ACTT_RECOMMENDED_DEGREE;
                                        
                                        for($i=1;$i<=$a;$i++)
                                        {
                                            echo '<img height="14" src="components/com_fractivitive/public/images/hoshi.gif" width="14" />';
                                            //echo $i;
                                        } 
                                    ?>
                        </span>                                             
                        </h2>
                        </td>
                    </tr>
                    
                    
                    <tr>
                        <td class="td_large" colspan="3"><?php echo $value->ACTT_REMARKS; ?></td>                                   
                    </tr>
                    <tr>
                        <td colspan="3"><hr /></td>
                    </tr>
                    <tr>
                        <td>【センター・クラブ名】</td>
                        <td><?php echo $value->OCBA_NAME; ?></td>
                        <td>
                            <?php
                                $reg=$value->ACTT_RECR;
                                if ($reg==1)
                                    echo '募集開始前';
                                else if ($reg==2)
                                    echo ' 募集中';
                                else if ($reg==3)
                                    echo '募集終了';
                            ?>
                        </td>
                        
                    </tr>
                    
                    <tr>
                        <td class="cols-1">【期間】</td>                        
                        <td class="cols-2"><?php if($value->ACTT_PERIOD_START!='0000-00-00') { echo HelperBG::F_GetDate_JP($value->ACTT_PERIOD_START);echo ' ～ ';} ?><?php if($value->ACTT_PERIOD_FINISH!='0000-00-00') echo HelperBG::F_GetDate_JP($value->ACTT_PERIOD_FINISH); ?></td>
                        <td class="cols-3">【人数】 <?php if($value->ACTT_NUMBER_OF_PARTICIPANTS!='null') echo $value->ACTT_NUMBER_OF_PARTICIPANTS.'人' ; ?></td>
                        
                    </tr>
                    <tr>
                        <td class="cols-1">【ジャンル】</td>
                        <td class="cols-2" colspan="2">
                        <?php 
                         if(!empty($value->LIST_MFAC)){ echo $value->LIST_MFAC; }
                         if(!empty($value->LIST_MFAC) && !empty($value->LIST_MOBJ)){ echo ","; }
                         if(!empty($value->LIST_MFAC) && empty($value->LIST_MOBJ) && !empty($value->LIST_MCON)){ echo ","; }
                         if(!empty($value->LIST_MOBJ)){ echo $value->LIST_MOBJ; }
                         if(!empty($value->LIST_MOBJ) && !empty($value->LIST_MCON)){ echo ","; }
                         if(!empty($value->LIST_MCON)){ echo $value->LIST_MCON; } 
                        ?>
                        </td>
                        
                    </tr>
                </tbody>
            </table>
            </div>
        
        <?php
                }
        ?>
        
        <table style="width: 100%;">
            <tfoot>
    			<tr>
    				<td colspan="15" style="text-align: center;">
    				    <?php echo $this->paginationActivity->getListFooter(); ?>
                    </td>
    			</tr>
    		</tfoot>
      </table>
        
        <?php
            }else{
        ?>
            <div>
                <p align="center">データは見つかりませんでした</p>
            </div>
        <?php
            }
        ?>
        </div>
        
        <input type="hidden" name="task" value="activitive" /> 
        <input type="hidden" name="id" value="<?php echo $this->info_ocba->OCBA_CODE; ?>" />    
        
</div>

 <!-- END CONTENT -->
 </form>
 <script>
 Joomla.submitbutton = function(task){
    if(task == 'search'){
        Joomla.submitform(task, document.getElementById('adminFormSearch'));
        return false;
    }
 }
 </script>
                           